package com.lanou3g.musicenjoy.activities;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

import com.bartoszlipinski.flippablestackview.FlippableStackView;
import com.lanou3g.musicenjoy.R;
import com.lanou3g.musicenjoy.fragment.FlippableStackViewFragment;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by 李宁 on 15/10/21.
 * 向上翻页效果Activity
 */
public class RankingActivity extends FragmentActivity {


    @Bind(R.id.stack)
    FlippableStackView stack;
    //    @Bind(R.id.ranking)
//    FrameLayout ranking;
    private FragmentManager manager;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.fragment_flippablestackview);
        ButterKnife.bind(this);


        manager = getSupportFragmentManager();
        //开始事务
        FragmentTransaction transaction = manager.beginTransaction();

//        RankingFragment rankingFragment = new RankingFragment();
//        transaction.replace(R.id.ranking, rankingFragment);
        FlippableStackViewFragment ff = new FlippableStackViewFragment();
        transaction.replace(R.id.stack, ff);
        transaction.commit();


    }
}
